<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>

<script type="text/javascript" src="${pageContext.request.contextPath }/js/jquery.livequery.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath }/js/jquery.validate.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath }/js/jquery.validate.extend.js"></script>

<script type="text/javascript" src="${pageContext.request.contextPath }/js/My97DatePicker/WdatePicker.js"></script>


<div class="module">
   <p class="title">订单信息
		<span class="title-tools">
	  		<a href="javascript: void(0);" class="asideBtn" onclick="javascript: getOrdersList('${param.site}');">返回</a>
	  	</span>
   </p>
   
   <c:set var="readonly" />
   <c:if test="${null!=orders }">
   		<c:set value="readonly='readonly'" var="readonly"/>
   </c:if>
   
   <form id="form">
   		<div class="content">
       	   <br>
			<ul class="summary-table" style="width: 95%; margin: auto auto">
			
				<li>
					<label class="col1">订单号</label>
					<span class="col2">
						<input class="ctr-input" id="orderNumber" name="orderNumber" value="${null==orders?'':orders.orderNumber }" ${readonly }/>
					</span>
				</li>
				
				<li>
					<label class="col1">车场名称</label>
					<span class="col2">
						<input class="ctr-input" id="parkingName" name="parkingName" value="${null==orders?'':orders.parkingName }" ${readonly }/>
					</span>
				</li>
				
				<li>
					<label class="col1">车场地址</label>
					<span class="col2">
						<input class="ctr-input" id="parkingAddress" name="parkingAddress" value="${null==orders?'':orders.parkingAddress }" ${readonly }/>
					</span>
				</li>
				
				<li>
					<label class="col1">订单用户</label>
					<span class="col2">
						<input class="ctr-input" id="userId" name="userId" value="${null==user?'非平台用户':user.mobileNumber }" ${readonly }/>
					</span>
				</li>
				
				<li>
					<label class="col1">订单状态</label>
					<span class="col2">
						<c:set var="status"/>
						<c:if test="${orders.status==0 }"><c:set var="status">计时中</c:set></c:if>
           				<c:if test="${orders.status==1 }"><c:set var="status">等待支付</c:set></c:if>
           				<c:if test="${orders.status==2 }"><c:set var="status">完成</c:set></c:if>
						<input class="ctr-input" id="status" name="status" value="${status }" ${readonly }/>
					</span>
				</li>
				
				<li>
					<label class="col1">车牌号</label>
					<span class="col2">
						<input class="ctr-input" id="plateNumber" name="plateNumber" value="${null==orders?'':orders.plateNumber }" ${readonly }/>
					</span>
				</li>
				
				<li>
					<label class="col1">入场时间</label>
					<span class="col2">
						<c:set var='time'><fmt:formatDate value='${orders.startTime }' pattern='yyyy-MM-dd HH:mm:ss' /></c:set>
						<input type="text" class="ctr-input" id="startTime" name="startTime" value="${time }" ${readonly }/>
					</span>
				</li>
				
				<li>
					<label class="col1">离场时间</label>
					<span class="col2">
						<c:set var='time'><fmt:formatDate value='${orders.endTime }' pattern='yyyy-MM-dd HH:mm:ss' /></c:set>
						<input type="text" class="ctr-input" id="endTime" name="endTime" value="${time }" ${readonly }/>
					</span>
				</li>
				
				<li>
					<label class="col1">金额</label>
					<span class="col2">
						<input class="ctr-input" id="amount" name="amount" value="${null==orders?'':orders.amount/100 }" ${readonly }/>
					</span>
				</li>
				
				<li>
					<label class="col1">支付方式</label>
					<span class="col2">
						<input class="ctr-input" id="payMode" name="payMode" value="${null==orders?'':orders.payMode }" ${readonly }/>
					</span>
				</li>
				
				<li>
					<label class="col1">车场唯一标识</label>
					<span class="col2">
						<input class="ctr-input" id="identification" name="identification" value="${null==orders?'':orders.identification }" ${readonly }/>
					</span>
				</li>
				
				<li>
					<label class="col1">车场会员</label>
					<span class="col2">
						<input class="ctr-input" id="memberFlag" name="memberFlag" value="${null==orders?'':orders.memberFlag }" ${readonly }/>
					</span>
				</li>
				
				<li>
					<label class="col1">创建时间</label>
					<span class="col2">
						<c:set var='time'><fmt:formatDate value='${orders.createTime }' pattern='yyyy-MM-dd HH:mm:ss' /></c:set>
						<input type="text" class="ctr-input" id="createTime" name="createTime" value="${time }" ${readonly }/>
					</span>
				</li>
			</ul>
			
		</div>
    </form>
   
</div>
<script type="text/javascript">
	/* $('#updateSubmit').bind('click', function() {
		handleManager();
	});

	function handleManager() {
		if ($("#form").valid()) {
			$.ajax({
				type : "POST",
				url : contextPath + "/web/managerCenter/handleManager",
				data : $("#form").serialize(),
				dataType : "json",
				beforeSend : function() {
					$("#beforeLoading").show();
				},
				success : function(res) {
					$("#beforeLoading").hide();
					if (res.resData.status) {

						succHint();

						setTimeout(function() {
							getManagerList();
						}, 2500);

					} else {
						failHint(res.msg);
					}

				},
				error : function(msg) {
					$("#beforeLoading").hide();
					failHint();
				}
			});
		}
	} */
</script>

